clear all;

load('synthetic_control.mat');

alpha_n3=mean([y_treat94(:,2);y_treat96(:,2);y_treat96(:,3)]-[y_SC94(:,2);y_SC96(:,2);y_SC96(:,3)]);
alpha_n2=mean([y_treat92(:,2);y_treat94(:,3);y_treat96(:,4)]-[y_SC92(:,2);y_SC94(:,3);y_SC96(:,4)]);
alpha_n1=mean([y_treat90(:,2);y_treat92(:,3);y_treat94(:,4);y_treat96(:,5)]-[y_SC90(:,2);y_SC92(:,3);y_SC94(:,4);y_SC96(:,5)]);
alpha_0=mean([y_treat90(:,3);y_treat92(:,4);y_treat94(:,5);y_treat96(:,6)]-[y_SC90(:,3);y_SC92(:,4);y_SC94(:,5);y_SC96(:,6)]);
alpha_1=mean([y_treat90(:,4);y_treat92(:,5);y_treat94(:,6)]-[y_SC90(:,4);y_SC92(:,5);y_SC94(:,6)]);
alpha_2=mean([y_treat90(:,5);y_treat90(:,6);y_treat92(:,6)]-[y_SC90(:,5);y_SC90(:,6);y_SC92(:,6)]);

ate=[alpha_n3,alpha_n2,alpha_n1,alpha_0,alpha_1,alpha_2];

nnewbranch=length(y_treat90)+length(y_treat92)+length(y_treat94)+length(y_treat96);
nobs=2 * nnewbranch * 5; % 2 because we have both treatment market and synthetic control market, 5 because we use 5 years' data, from 88 to 96
